package com.zhao.dota.vo;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.zhao.dota.contant.GameModelConst;
import com.zhao.dota.contant.TeamConst;
import com.zhao.dota.model.LeagueMatch;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Data
@NoArgsConstructor
public class LeagueMatchVo {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private LocalDateTime createTime;
    /**
     * dota_match表主键
     */
    private Integer dotaMatchId;
    /**
     * 结束时间
     */
    private LocalDateTime endTime;
    /**
     * 模式
     */
    private GameModelConst gameMode;
    /**
     * 胜利方
     */
    private TeamConst winner;

    private List<UserHeroVo> users;

    public LeagueMatchVo(LeagueMatch match, List<UserHeroVo> users) {
        BeanUtil.copyProperties(match, this);
        this.users = users;
    }

}
